// 引入接口
import { getBannerAPI } from '@/apis/layout/index'
import { ref, onMounted } from 'vue'

export const useBanner = () => {
  let bannerList = ref<any>([])
  const getBanner = async () => {
    let res = await getBannerAPI({ distributionSite: '2' })
    if (res.code === '1') {
      bannerList.value = res.result
    }
  }
  onMounted(() => {
    getBanner()
  })
  return {
    bannerList,
  }
}
